package com.yesjpt.domain;

import lombok.Data;

@Data
public class Dog extends Animal {//继承
    private String newAttr;
    private int price;
    private String bossName;

    public Dog() {

    }

    public Dog(String name) {
        this.setName(name);
    }

    //重写超类同名方法
    @Override
    public void barking() {
        System.out.println("汪汪汪汪汪汪汪汪汪汪汪汪汪汪汪汪汪");
    }
}
